{% load url from future %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
<title>OWMX</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="/styles/a.css" media="screen">
<script type="text/javascript" src="/js/jquery-1.7.1.min.js"></script>
</head>
<body>
<div id="a">
  <header> <a href="#" title="Go to Homepage"><strong>OWMX</strong> LOGISTIC</a>
    <p>Panel Administracyjny</p>
  </header>
  <div id="b">
    <aside>
      <h4>Zalogowany jako</h4>
      <div id="c"> <img src="/images/jonas-jacek.png" alt="{% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}">
        <p><strong>{% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}</strong></p>
        <p>{% url 'admin:password_change' as password_change_url %}
                {% if password_change_url %} <a href="{{ password_change_url }}">
                {% else %} <a href="{{ root_path }}password_change/">{% endif %}Zmień hasło</a></p>
        <p>{% url 'admin:logout' as logout_url %} {% if logout_url %} <a href="{{ logout_url }}"> {% else %}
                    <a href="{{ root_path }}logout/">{% endif %}Wyloguj</a></p>
      </div>
      <nav>
        <h4>Ostatnie akcje</h4>
	{% load log %}
	{% get_admin_log 10 as admin_log for_user user %}
	{% if not admin_log %}
	<p>{% trans 'None available' %}</p>
	{% else %}
	<ul>
        {% for entry in admin_log %}
            <li>
                {% if entry.is_deletion or not entry.get_admin_url %}
                    {{ entry.object_repr }}
                {% else %}
                    <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
                {% endif %}
                <br/>
                {% if entry.content_type %}
                    <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
                {% else %}
                    <span class="mini quiet">{% trans 'Unknown content' %}</span>
                {% endif %}
            </li>
            {% endfor %}
            </ul>
            {% endif %}
      </nav>
    </aside>
    {% if app_list %}
    {% for app in app_list %}
        <article>
	<h1>{% blocktrans with app.name as name %}Moduły dostępne w  {{ name }}.{% endblocktrans %}</h1>
        <table summary="{% blocktrans with app.name as name %}Modele dostępne w  {{ name }}.{% endblocktrans %}">
        <caption>{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</caption>
        {% for model in app.models %}
            <tr>
            {% if model.perms.change %}
                <td scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
            {% else %}
                <td scope="row">{{ model.name }}</th>
            {% endif %}

            {% if model.perms.add %}
                <td><a href="{{ model.admin_url }}add/" class="addlink">Dodaj</a></td>
            {% else %}
                <td>&nbsp;</td>
            {% endif %}

            {% if model.perms.change %}
                <td><a href="{{ model.admin_url }}" class="changelink">Zmień</a></td>
            {% else %}
                <td>&nbsp;</td>
            {% endif %}
            </tr>
        {% endfor %}
        </table>
        </article>
    {% endfor %}
{% else %}
    <p>Nie masz uprawnień aby co kolwiek zmienić.</p>
{% endif %}
  </div>
  <footer>
    <p><!--Template Design &amp; Markup by <a href="http://jabz.net/contact/jonas-jacek">Jonas Jacek</a> | <a href="http://owmx.com/" title="Free HTML5 &amp; CSS3 Web Templates">Free Web Templates</a>.--></p>
  </footer>
</div>
</html>
